package edu.uhcl.team_drone.screens;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import edu.uhcl.team_drone.assets.Assets;
import edu.uhcl.team_drone.game.ProjectGame;

public class MainMenuScreen implements Screen {

    private SpriteBatch sb;
    private ProjectGame game;

    private int screenWidth, screenHeight;
    private int halfWidth, halfHeight;

    public MainMenuScreen(ProjectGame gameIn) {
        this.game = gameIn;
        screenWidth = Gdx.graphics.getWidth();
        screenHeight = Gdx.graphics.getHeight();
        halfWidth = screenWidth / 2;
        halfHeight = screenHeight / 2;
    }

    @Override
    public void show() {
        sb = new SpriteBatch();
    }

    @Override
    public void render(float delta) {
        Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);

        sb.begin();
        Assets.fontSize12.draw(sb, "size 12 font", halfWidth, halfHeight - 60);
        Assets.fontSize16.draw(sb, "size 16 font", halfWidth, halfHeight + 0);
        Assets.fontSize20.draw(sb, "size 20 font", halfWidth, halfHeight + 60);
        sb.end();

    }

    @Override
    public void resize(int width, int height) {
        screenWidth = width;
        screenHeight = height;
        halfWidth = screenWidth / 2;
        halfHeight = screenHeight / 2;
    }

    @Override
    public void pause() {
    }

    @Override
    public void resume() {
    }

    @Override
    public void hide() {
    }

    @Override
    public void dispose() {
    }

}
